Create STOP Payment
Creates a new STOP Payment as a Standing Order using the CreateStandingOrder method for an account to prevent ACH_IN_DEBIT transactions. Set channel to STOP_PAYMENTS and transactionType to ACH_IN_DEBIT.
Method: POST
{{URL}}/jsonrpc
Example
Request Parameters
| Parameter | Description |
|---|---|
| validUntilDate Conditional Mandatory (Required if 'noEndDate' is 'false') | String (MM/DD/YYYY) Expiry date for the STOP payment instruction. |
| channel Mandatory | String Must be set to "STOP_PAYMENTS" to indicate a STOP instruction. |
| transactionType Mandatory | String Type of transaction to stop (e.g., "ACH_IN_DEBIT"). |
| maxPerTransactionAmount Mandatory | Integer Maximum allowed transaction amount before STOP is triggered. |
| originatorName Mandatory | String Name of the transaction initiator. |
| isOneTimeUse Mandatory | Boolean Whether this STOP payment is a single-use action. |
| accountId Mandatory | String Account ID where the STOP Payment is being applied. |
| noEndDate Optional | Boolean Set value as 'true' if Stop Payments require a validity. Set value as 'false' if validity is not required |
| api Mandatory | Object |
| credential Mandatory | String Basic (space) [( "<Username>:<apiKey>") as Base64 encoded value] to be provided Sample Value: "Basic bmF2eWEubitlbXBAbmV0eGQuY29tOmY1OWIwY2NlOTU4ZTQ1YTc4MGVhZWIzYWVjOWVjZDAx" |
| signature Mandatory | String Sign the request payload (params.payload) using private key. Sample Value: "MEQCIAbpxHpdOyBEVlmxPYv7m4Z1OvWJJYw7g7u3GE3T9nmvAiBjKHckSvb1M6O4t7FeWsn2z9Y3dMeYn3HyX/k28ek/Dw==" |
| apiKey Optional | String API key is provided at the time of device registration. Sample Value : "f59b0cce958e45a780eaeb3aec9ecd01" |
- cURL
- C#
- Go
- NodeJs
curl --location '{{URL}}/PL/jsonrpc' \
--header 'Content-Type: application/json' \
--data-raw '{"method":"SmartContractService.CreateStandingOrder","id":"1","params":{"payload":{"validUntilDate":"12/1/2025","channel":"STOP_PAYMENTS","transactionType":"ACH_IN_DEBIT","maxPerTransactionAmount":1000,"originatorName":"Sender customer","isOneTimeUse":false,"accountId":"18492004","noEndDate":true},"api":{"credential":"Basic ZmludGVjaGRmQG9yZy5jb206MzljMGE2ZTUyOTlkNGVjMjkyNDg3NGY0N2YyYzQxOGU==","signature":"MEYCIQDp/IBLAa0bKRbB6ZqzEDyWmPkY1msdvV2bAnlHEpA4tAIhANxnUZgPxPba5XfwbfDm544a2rDYQQiPTF2TASZYhwaL","apiKey":"39c0a6e5299d4ec2924874f47f2c418e","keyId":"42002"}}}'
var options = new RestClientOptions("http://localhost:5020")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/PL/jsonrpc", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""method"": ""SmartContractService.CreateStandingOrder""," + "\n" +
@" ""id"": ""1""," + "\n" +
@" ""params"": {" + "\n" +
@" ""payload"": {" + "\n" +
@" ""validUntilDate"": ""12/1/2025""," + "\n" +
@" ""channel"": ""STOP_PAYMENTS""," + "\n" +
@" ""transactionType"": ""ACH_IN_DEBIT""," + "\n" +
@" ""maxPerTransactionAmount"": 1000," + "\n" +
@" ""originatorName"": ""Sender customer""," + "\n" +
@" ""isOneTimeUse"": false," + "\n" +
@" ""accountId"": ""18492004""," + "\n" +
@" ""noEndDate"": true" + "\n" +
@" }," + "\n" +
@" ""api"": {" + "\n" +
@" ""credential"": ""Basic ZmludGVjaGRmQG9yZy5jb206MzljMGE2ZTUyOTlkNGVjMjkyNDg3NGY0N2YyYzQxOGU==""," + "\n" +
@" ""signature"": ""MEYCIQDp/IBLAa0bKRbB6ZqzEDyWmPkY1msdvV2bAnlHEpA4tAIhANxnUZgPxPba5XfwbfDm544a2rDYQQiPTF2TASZYhwaL""," + "\n" +
@" ""apiKey"": ""39c0a6e5299d4ec2924874f47f2c418e""," + "\n" +
@" ""keyId"": ""42002""" + "\n" +
@" }" + "\n" +
@" }" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:5020/PL/jsonrpc"
method := "POST"
payload := strings.NewReader(`{
"method": "SmartContractService.CreateStandingOrder",
"id": "1",
"params": {
"payload": {
"validUntilDate": "12/1/2025",
"channel": "STOP_PAYMENTS",
"transactionType": "ACH_IN_DEBIT",
"maxPerTransactionAmount": 1000,
"originatorName": "Sender customer",
"isOneTimeUse": false,
"accountId": "18492004",
"noEndDate": true
},
"api": {
"credential": "Basic ZmludGVjaGRmQG9yZy5jb206MzljMGE2ZTUyOTlkNGVjMjkyNDg3NGY0N2YyYzQxOGU==",
"signature": "MEYCIQDp/IBLAa0bKRbB6ZqzEDyWmPkY1msdvV2bAnlHEpA4tAIhANxnUZgPxPba5XfwbfDm544a2rDYQQiPTF2TASZYhwaL",
"apiKey": "39c0a6e5299d4ec2924874f47f2c418e",
"keyId": "42002"
}
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var http = require('follow-redirects').http;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'localhost',
'port': 5020,
'path': '/PL/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "SmartContractService.CreateStandingOrder",
"id": "1",
"params": {
"payload": {
"validUntilDate": "12/1/2025",
"channel": "STOP_PAYMENTS",
"transactionType": "ACH_IN_DEBIT",
"maxPerTransactionAmount": 1000,
"originatorName": "Sender customer",
"isOneTimeUse": false,
"accountId": "18492004",
"noEndDate": true
},
"api": {
"credential": "Basic ZmludGVjaGRmQG9yZy5jb206MzljMGE2ZTUyOTlkNGVjMjkyNDg3NGY0N2YyYzQxOGU==",
"signature": "MEYCIQDp/IBLAa0bKRbB6ZqzEDyWmPkY1msdvV2bAnlHEpA4tAIhANxnUZgPxPba5XfwbfDm544a2rDYQQiPTF2TASZYhwaL",
"apiKey": "39c0a6e5299d4ec2924874f47f2c418e",
"keyId": "42002"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "SmartContractService.CreateStandingOrder",
"id": "1",
"params": {
"payload": {
"validUntilDate": "12/1/2025",
"channel": "STOP_PAYMENTS",
"transactionType": "ACH_IN_DEBIT",
"maxPerTransactionAmount": 1000,
"originatorName": "Sender customer",
"isOneTimeUse": false,
"accountId": "18492004",
"noEndDate": true
},
"api": {
"credential": "Basic ZmludGVjaGRmQG9yZy5jb206MzljMGE2ZTUyOTlkNGVjMjkyNDg3NGY0N2YyYzQxOGU==",
"signature": "MEYCIQDp/IBLAa0bKRbB6ZqzEDyWmPkY1msdvV2bAnlHEpA4tAIhANxnUZgPxPba5XfwbfDm544a2rDYQQiPTF2TASZYhwaL",
"apiKey": "39c0a6e5299d4ec2924874f47f2c418e",
"keyId": "42002"
}
}
}
Response: 200
Response Parameters
| Parameter | Description |
|---|---|
| id | String A unique identifier for the request |
| result | Object Contains the result of the operation |
| ID | String A unique identifier for the newly created standing order |
| message | String A message indicating the status of the operation (e.g., "Standing Order Created Successfully") |
| jsonrpc | String The version of the JSON-RPC protocol (e.g., "2.0") |
{
"id": "1",
"result": {
"ID": "TK10000000000009003",
"message": "Standing Order Created Successfully"
},
"jsonrpc": "2.0"
}